package com.chenl.provider.DEMOS.WebMvcConfigurer配置;

import com.chenl.provider.DEMOS.Spring.Spring参数解析器.MyResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

//@Order(1)
//@Configuration
public class MyConfiguration implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new MyTestInterceptor())
                .addPathPatterns("/**");// addPathPatterns("/**") 设置拦截哪些请求，/** 拦截所有请求
//                .excludePathPatterns("/test");// 指定放行哪些请求
    }

}